]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
background: Fix file check
authorFlorian Müllner <fmuellner@gnome.org>
Thu, 30 Mar 2017 15:56:30 +0000 (17:56 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Tue, 11 Apr 2017 00:43:07 +0000 (02:43 +0200)
The _animationFile property was removed in commit 8a4c86263362c ...

js/ui/background.js

index fc27898105123e9f35d221b270508ecc43cae686..5f4ce0d3e22500d079113cbd179ca3688a1be0b6 100644 (file)
@@ -166,7 +166,8 @@ const BackgroundCache = new Lang.Class({
                                         settingsSchema: null,
                                         onLoaded: null });
 
-        if (this._animations[params.settingsSchema] && _fileEqual0(this._animationFile, params.file)) {
+        let animation = this._animations[params.settingsSchema];
+        if (animation && _fileEqual0(animation.file, params.file)) {
             if (params.onLoaded) {
                 let id = GLib.idle_add(GLib.PRIORITY_DEFAULT, Lang.bind(this, function() {
                     params.onLoaded(this._animations[params.settingsSchema]);
@@ -177,7 +178,7 @@ const BackgroundCache = new Lang.Class({
             return;
         }
 
-        let animation = new Animation({ file: params.file });
+        animation = new Animation({ file: params.file });
 
         animation.load(Lang.bind(this, function() {
                            this._animations[params.settingsSchema] = animation;